package Chapter2.Comparing.c8;

import javax.xml.crypto.Data;
import java.io.*;

public class DataOutPutStremDemo {


    public static void main(String[] args) {
        try {
            /*DataOutputStream dops = new DataOutputStream(new FileOutputStream("Doc/e.dat"));*/

            /*int a = 952718,b= 4,c = 2;
            dops.writeInt(a);
            dops.writeInt(b);
            dops.writeInt(c);*/
            //dops.close();

            DataInputStream dis = new DataInputStream(new FileInputStream("Doc/e.dat"));
            int a = dis.readInt();
            int b = dis.readInt();
            int c = dis.readInt();
            int d = dis.readInt();

            System.out.println(a);
            System.out.println(b);
            System.out.println(c);
            System.out.println(d);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
